
char* replaceSpace(char* s) {
	int len = strlen(s);
	int space_cnt = 0;
	char* cur = s;
	while (*cur) {
		if (*cur == ' ') {
			space_cnt++;
		}
		cur++;
	}
	char* str = (char*)malloc((len + space_cnt * 2 + 1) * sizeof(char));
	char* tmp = str;
	cur = s;
	while (*cur) {
		if (*cur != ' ') {
			*tmp++ = *cur++;
		}
		else {
			*tmp++ = '%';
			*tmp++ = '2';
			*tmp++ = '0';
			cur++;
		}
	}
	*tmp = '\0';
	return str;
}